package com.example.callmanagerandroid;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.example.user.User;

public class DauSoAdapter extends BaseAdapter{
	
	private List<String> number = new ArrayList<String>();
	private Context context;
	


	public DauSoAdapter( List<String> number,
			Context context) {
		super();
		this.number = number;
		this.context = context;
	}

	@Override
	public int getCount() {
		return number.size();
	}

	@Override
	public Object getItem(int position) {
		return number.get(position);
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		View list;
		if (convertView == null) {
			list = new View(context);
			list = LayoutInflater.from(context).inflate(
					R.layout.sdt_items, null);
		} else {
			list = (View) convertView;
		}
		
		TextView phone = (TextView) list.findViewById(R.id.textView1);
		phone.setText(number.get(position));;
		
		return list;
	}

}
